export function dateObject(date=new Date()) {
    const year = date.getFullYear()
    const fullMonth = date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1
    const month = date.getMonth() + 1
    const fullDay = date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()
    const day = date.getDate()
    const time = date.getTime()
    const weekday = date.getDay()
    return {
        year,
        month,
        fullMonth,
        day,
        fullDay,
        time,
        weekday
    }
}
// 获取某月份有几天
function getDays(year, month) {
    // 0：代表上月最后一天。这里month，不需要 - 1，传入的时候本身就 + 1.
    return new Date(year, month, 0).getDate()
}
